]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[AppWell] Position menu components on integral coordinates
authorColin Walters <walters@verbum.org>
Tue, 8 Sep 2009 21:53:45 +0000 (17:53 -0400)
committerColin Walters <walters@verbum.org>
Tue, 8 Sep 2009 22:48:17 +0000 (18:48 -0400)
This avoids fuzz.

http://bugzilla.gnome.org/show_bug.cgi?id=594553

js/ui/appDisplay.js

index 629becfffd4449ebfd3d6a291631ea28581c136a..58948ff4cb40649a262646feef5a2bf586870c35 100644 (file)
@@ -533,7 +533,7 @@ WellMenu.prototype = {
 
         childBox.x1 = 0;
         childBox.x2 = WELL_MENU_ARROW_SIZE;
-        childBox.y1 = (height / 2) - (WELL_MENU_ARROW_SIZE / 2);
+        childBox.y1 = Math.floor((height / 2) - (WELL_MENU_ARROW_SIZE / 2));
         childBox.y2 = childBox.y1 + WELL_MENU_ARROW_SIZE;
         this._arrow.allocate(childBox, flags);
 
@@ -622,8 +622,9 @@ WellMenu.prototype = {
 
         this.emit('popup', true);
 
+        let x = Math.floor(stageX + stageWidth);
         let y = Math.floor(stageY + (stageHeight / 2) - (this.actor.height / 2));
-        this.actor.set_position(stageX + stageWidth, y);
+        this.actor.set_position(x, y);
         this.actor.show();
     },